package com.hjl.path;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author ServivE
 * @version 0.1
 * @className PathController
 * @description
 * @date 2024/8/12 19:38
 * @since jdk11
 */
@RequestMapping("path")
@Controller
@ResponseBody
public class PathController {

    //设计动态路径
    //localhost:8080/path/root/123456
    @RequestMapping("{account}/{password}")
    public String path1(@PathVariable(value = "account",required = true) String username, @PathVariable String password) {
        System.out.println(username + " " + password);
        return username + " " + password;
    }
}
